package core.proto.timeline;

import de.jaret.util.date.JaretDate;
import de.jaret.util.ui.timebars.model.DefaultRowHeader;
import de.jaret.util.ui.timebars.model.DefaultTimeBarModel;
import de.jaret.util.ui.timebars.model.DefaultTimeBarRowModel;
import de.jaret.util.ui.timebars.model.TimeBarModel;

/**
 * Represents a set of rows in the time line. 
 * @author Wei
 */
public class SavantTimelineModel extends DefaultTimeBarModel {
	private JaretDate start; 
	private JaretDate end;
	private DefaultTimeBarRowModel morningRow;
	private DefaultTimeBarRowModel eveningRow;

	public SavantTimelineModel(JaretDate start, JaretDate end){
		super();

		this.start = start; 
		this.end = end;

		// 0-12 hr
		this.morningRow = new DefaultTimeBarRowModel(new DefaultRowHeader("    Timeline"));
		this.addRow(morningRow);

		// 12-24 hr
		this.eveningRow= new DefaultTimeBarRowModel(new DefaultRowHeader("   12-24"));
		//this.addRow(this.eveningRow);
	}
	
	public DefaultTimeBarRowModel getMorningRow(){
		return this.morningRow;
	}
	
	public DefaultTimeBarRowModel getEveningRow () {
		return this.eveningRow;
	}

	public JaretDate getMinDate(){
		return start.copy();
	}

	public JaretDate getMaxDate(){
		return end.copy();
	}
}	
